initrd/docs: improve dongle detection, STATUS flow, boot respawn, and doc alignment#2094
Conversation
There was a problem hiding this comment.
Pull request overview
Updates initrd scripts to detect USB security dongle branding earlier and to refine console logging behavior (especially for quiet mode) by shifting messages among STATUS/STATUS_OK/NOTE/WARN and adding more explicit success milestones.
Changes:
- Add an early sysfs-based wait in
detect_usb_security_dongle_branding()to reduce mis-detection beforelsusbis reliable. - Rebalance user-visible logging across multiple initrd scripts (more STATUS/STATUS_OK, convert some INFO→NOTE/WARN, add success confirmations).
- Expand
doc/logging.mdto clarify intended semantics of INFO/NOTE/WARN and console behavior in quiet/info/debug modes.
Reviewed changes
Copilot reviewed 3 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| initrd/etc/gui_functions.sh | Adjust integrity report output; add signing-key status messaging. |
| initrd/etc/functions.sh | Add sysfs VID wait loop before lsusb branding detection. |
| initrd/bin/unseal-hotp.sh | Add STATUS/STATUS_OK around TPM unseal of HOTP secret. |
| initrd/bin/tpmr.sh | Change TPM2 unseal failure log level (INFO→WARN). |
| initrd/bin/seal-totp.sh | Promote PCR-read logging to STATUS; show manual secret via NOTE. |
| initrd/bin/seal-hotpkey.sh | Add STATUS/STATUS_OK around writing HOTP secret to dongle. |
| initrd/bin/oem-factory-reset.sh | Add STATUS_OK milestones; adjust guidance output levels; fix TPM reset error handling block structure. |
| initrd/bin/network-init-recovery.sh | Add STATUS_OK milestones for module load, clock sync, and SSH server start. |
| initrd/bin/lock_chip.sh | Add STATUS_OK after chipset lock command. |
| initrd/bin/key-init.sh | Reword ISO key loading messages and add final STATUS_OK. |
| initrd/bin/kexec-seal-key.sh | Add STATUS_OK milestones for key generation, LUKS slot update, PCR reads. |
| initrd/bin/gui-init.sh | Reduce/shift console output in reseal/TOTP/HOTP flows; add HOTP verification status lines. |
| initrd/bin/gpg-gui.sh | Convert INFO instructions to NOTE. |
| initrd/bin/cbfs-init.sh | Adjust SPI read messaging; add STATUS_OK on flash read success. |
| doc/logging.md | Redefine INFO/NOTE positioning and document console styling/sleep/visibility matrix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9361484 to
2a485c5
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 15 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2a485c5 to
5e09ef9
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 15 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5e09ef9 to
c03366b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 15 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c03366b to
fee4251
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 16 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 26 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Splitted tpm1 issues in pr #2099 with refactoring to unify tpm1/tmp2 worflow. will rebase this pr once merged |
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
… and long-op STATUS outcomes Align documentation and runtime messaging to match current behavior: - docs: synchronize recovery flow, dongle mapping, DUK/measurement wording - initrd runtime: make long dongle/GPG/HOTP waits report explicit STATUS outcomes (success, degraded continuation, or warning) instead of silent/bare waits - keep wording context-accurate between reseal and /boot signing paths This captures the combined scope now present in this commit after autosquash. Signed-off-by: Thierry Laurion <insurgo@riseup.net>
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
|
Some output of logs to put as ref in op on default boot ( /tmp/debug.log/tmp/measuring_trace.log |
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
|
@notgivenby @marmarek decided to switch DEBUG to WARN when usb keyboard is enforced per board/user config per 9a98d79 See WARNING in yellow. There is now no way users are not aware of it. Tested on x230-hotp-maximized enabling usb keyboard in config menu. Q: @marmarek we can deprecate EOL_x230-hotp-maximized_usb-kb? |
| # Timeout after 2 seconds | ||
| if awk -v s="$start" -v n="$now" 'BEGIN{exit (n - s > 2.0) ? 0 : 1}'; then | ||
| DEBUG "USB wait timeout at ${elapsed}s (iter $iteration): only found $peripheral_count peripheral device(s)" | ||
| WARN "USB peripheral devices were not detected within 2s, continuing" |
That still can be enabled in the config menu, right? If so, dropping separate build is fine with me. |
…cally, document seeds - Fix regression from a2a027f: replace x230-hotp-maximized_usb-kb with x230-hotp-maximized in CI (was accidentally swapped) - Group all boards under their respective coreboot fork - Sort entries alphabetically within each fork group - Move EOL_t480 and EOL_t480s into the 25.09 group (were orphaned at bottom) - Reorder fork seeds alphabetically - Document downstream boards per seed Signed-off-by: Thierry Laurion <insurgo@riseup.net>
yes, can be enabled with internal keyboard through config menu + save to flash. This results in EOL_x230-hotp-maximized_usb-kb dropped in circleci for now in 13fef22 |

Closes #2098
Closes #2097
Closes #2096(previously fixed in #2103)Summary
This PR improves initrd behavior around USB security dongle detection, long-running STATUS/WARN messaging, and boot-script respawn handling, while aligning documentation with current behavior.
Changes Included
1. USB Security Dongle Detection
2. Logging And Long-Operation UX
3. Boot Respawn Robustness
4. Build And Documentation Alignment
Tested
Screenshots
USB dongle detection wait in action (x230, tpm1 hotp)

Detected once the dongle is plugged in, default boot v540tu (tpm2):

traces of current logs
See #2094 (comment)